package com.xunfang.demos;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @Author lss
 * @CreateTime 2024/6/11
 * @Description
 */

@WebServlet("/demo01")
public class Demo01Servlet extends HttpServlet {
    int a = 10;

    public void test() {
        System.out.println(a);
    }

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        String str = "";

        PrintWriter writer = resp.getWriter();
        writer.print("张三");
    }
}
